﻿CREATE TABLE [dbo].[order_paid] (
    [ID]             INT             IDENTITY (1, 1) NOT NULL,
    [OrderNo]        VARCHAR (255)   NOT NULL,
    [CustomerID]     INT             NOT NULL,
    [NoteDate]       DATETIME        NOT NULL,
    [OperatorUserID] INT             NOT NULL,
    [CreatedOn]      DATETIME        NOT NULL,
    [TotalMoney]     DECIMAL (18, 2) NOT NULL,
    [Method]         INT             NOT NULL,
    [Description]    VARCHAR (500)   NULL,
    CONSTRAINT [PK__order_pa__3214EC271920BF5C] PRIMARY KEY CLUSTERED ([ID] ASC),
    CONSTRAINT [FK_order_paid_customers] FOREIGN KEY ([CustomerID]) REFERENCES [dbo].[customers] ([ID]),
    CONSTRAINT [FK_order_paid_users] FOREIGN KEY ([OperatorUserID]) REFERENCES [dbo].[users] ([ID])
);



